package org.agile2soft.nexoma.tapestry.encoder;

import java.util.Locale;

import org.apache.tapestry5.ValueEncoder;


public class LocaleEncoder implements ValueEncoder<Locale> {

    public String toClient(Locale value) {
        return value.getLanguage();
    }

    public Locale toValue(String clientValue) {
        return new Locale(clientValue);
    }

}